package battleship;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;

public class StartupListener implements ServletContextListener {
    
    public void contextInitialized(ServletContextEvent event) {
        System.out.println("StartupListener: initializing");
        Context.users = new User[1000];
        Context.currentGames = new ArrayList<Game>();
        Context.openGames = new ArrayList<Game>();
        Context.onlineUsers = new ArrayList<User>();
        System.out.println("StartupListener: finished initializing");
    }
    
    public void contextDestroyed(ServletContextEvent event) {

    }
    
}
